package com.cn.wanxi.rabbitmq.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.UnsupportedEncodingException;

/**
 * @ClassName TeachersMQListener
 * @Description TODO
 * @Author JiJiang
 * @Date 2022/9/28 16:58
 * @Version 1.0
 */


@Slf4j
@Component

public class TeachersMQListener {
    @RabbitListener(queues = "wx_teachers")
    public void receive(Message message) throws UnsupportedEncodingException {
        log.info("老师们收到消息，消息内容是: {}", message);
    }
}
